package _15_generics._15_4;

import net.mindview.util.Sets;

import java.util.EnumSet;

import static _15_generics._15_4.Watercolors.*;

/**
 * Set的使用工具测试
 */
public class _07_WatercolorsSets {
    public static void main(String[] args) {
        EnumSet<Watercolors> set1 = EnumSet.range(BRILLIANT_RED, VIRIDIAN_HUE);
        EnumSet<Watercolors> set2 = EnumSet.range(CERULEAN_BLUE_HUE, BURNT_UMBER);
        System.out.println("set1: " + set1);
        System.out.println("set2: " + set1);
        System.out.println("union(set1,set2): " + Sets.union(set1,set2));
        System.out.println("intersection(set1,set2) "+Sets.intersection(set1,set2));
        System.out.println("difference(set1,set2) "+Sets.difference(set1,set2));
    }
}
